class SceneManager 
{
    private static s_SceneManager: SceneManager;
    public static getInstance():SceneManager
    {
        if(SceneManager.s_SceneManager == null)
        {
            SceneManager.s_SceneManager = new SceneManager();
        }
        return SceneManager.s_SceneManager;
    }
    private m_Scene:CoolScene;
    private m_Root:egret.DisplayObjectContainer;
	public constructor()
    {
	}
    public setMainRoot(root:egret.DisplayObjectContainer)
    {
        this.m_Root = root;
    }
    public runScene(scene:CoolScene)
	{
        this.m_Scene = scene;
        this.m_Root.addChild(this.m_Scene);
	}
    public replaceScene(scene:CoolScene)
    {
        this.m_Scene = scene;
        this.m_Root.removeChildren();
        this.m_Root.addChild(this.m_Scene);
    }
}